1. Field of the Invention
This invention relates to a method for controlling a servomotor, and particularly, to a method for controlling a servomotor which drives feed rods of a machine tool or robotics arms.
2. Description of the Related Art
In controlling feed rods of a machine tool, robotics arms or the like being driven by a servomotor, particularly during high speed cutting by a machine tool, there arises an error in profiling a work piece due to a follow-up delay of the servo system. For this reason, to minimize such profile error, sometimes feedforward control is applied to the positional loop.
More specifically, a value obtained by multiplying a differentiated value of a moving command (positional command) by a feedforward coefficient is added to a velocity command obtained by usual positional loop processing, whereby positional deviation is reduced to compensate the servo delay.
In general, a moving command is transferred from a numerically controlled device or the like to a positional loop on the side of a servo circuit in every distribution period. Such distribution period (interpolation (ITP) period) is generally about 8 msec, while a period of the positional loop or the velocity loop inside the servo circuit is around 2 msec or 1 msec.
In the positional loop, the ITP period is divided by the positional loop period, and it is controlled so that moving command values for the divided positional loop periods become equal to one another. Thus, as described above, even if an acceleration-deceleration time constant is afforded to a moving command outputted from a numerically controlled device, values of moving commands remain equal to each other during the respective positional loops in every position-velocity loop processing period in one ITP period, so that changes in magnitude of a moving command appear between the processing of a positional loop and that of another positional loop in which the ITP period changes. For this reason, significant changes in a moving command occur between positional loops where the ITP period changes.
In a feedforward term, when the moving command is differentiated to determine a velocity command, a value of the velocity command increases to include high frequency components. Consequently, follow-up becomes difficult in the velocity loop, and the swell appears in positional deviation. A poor control in the velocity loop becomes a cause of a remarkable shock to the movement of a motor or a machine.
As a means for eliminating the disadvantage described above, the present applicant has disclosed a method for controlling a servomotor in which acceleration-deceleration processing is inserted into a feedforward term of positional control and that of velocity control, whereby smoothing processing for removing the above described swell is carried out (Japanese Patent Laid-open No. 15911/1991).
However, the above described smoothing processing contains a problem such that swell and the like in positional deviation appear at the time of acceleration-deceleration in a positional loop control system. In this respect, the present applicant has further disclosed a feedforward control method in Japanese Patent Laid-open No. 19861/1993, in which a smoothing processing is applied to equalize the moving commands during the present position-velocity loop processing period utilizing the moving command outputted later than the present ITP period, and the value obtained by this smoothing processing, as the feedforward amount, is added to the moving command obtained by the ordinary position loop processing.
FIG. 13 is a block diagram for explaining a method of feedforward control for a servomotor. Reference numeral 1 designates a DDA (Digital Differential Analyzer) for dividing moving commands MCMD delivered from a CNC (numerically controlled device built into computer) in every distribution period (ITP period) into moving commands in every position-velocity loop processing period, 2 an error counter for determining positional deviation by adding the moving commands outputted from the DDA 1 to each other and subtracting moving amounts of the servomotor in every respective position-velocity loop processing period therefrom, 3 a term for determining a velocity command by multiplying the positional deviation stored in the error counter by a position gain Kp, 4 a term of velocity loop containing an integration constant k1 and a proportional constant k2, 5 and 6 terms each being a transfer function of the servomotor where Kt represents a torque constant and Jm represents motor inertia, 10 and 11 terms each being a transfer function of a machine connected to the servomotor where Km is a spring constant, Cm is a viscosity term, and J1 is machine inertia, 12 a term of a transfer function for converting a velocity into a position, 7 a term of smoothing processing means, and 8 a term for determining a feedforward amount FFp of position from the smoothing data SMD obtained by the smoothing processing means where k represents a parameter to be adjusted in response to characteristics and changes in acceleration of the machine connected to the servomotor, and a represents a feedforward coefficient of position, respectively.
In the smoothing processing means 7, the operation represented by the following equation (1) is executed to determine a mean value SMD of moving commands. In the term 8, the mean value SMD thus obtained is multiplied by the feedforward coefficient .alpha. to obtain the positional feedforward amount Ffp. EQU The mean value SMD=Z.sup.d (1+Z.sup.-1 +Z.sup.-2 . . . +Z.sup.-(N-1)).(divided MCMD)/N . . . (1)
where N is a value obtained by dividing the ITP period by the position-velocity loop period, Z.sup.-1 represents a delay of the position-velocity loop processing period, and Z.sup.d is an advancement element. In this case, d is made to be about 1/2 of the above described N. For example, when N is 8, d is 4 in the case of FIG. 13.
Furthermore, the reference numeral 9 designates a term for determining a velocity feedforward amount FFv from the mean value SMD where Ts is the position-velocity loop period.
As described above, while a torque command has been determined assuming that there is no delay in the current loop in a conventional feedforward control method for a servomotor, there is, actually however, a rise time constant in the current loop, so that the torque command does not directly correspond to actual torque, and thus, there is a problem about the responsibility of the current loop. The responsibility of the current loop largely affects a major part of changes in acceleration, when a feedforward control operation is executed. In other words, since changes in a moving command are differentiated in the feedforward term, a major part of the change in acceleration is produced by velocity feedforward, if the workpiece to be machined has a contour causing large changes in acceleration.